#include "Interfaces/IRendererContext.h"

#ifndef OGL_RENDER_CONTEXT
#define OGL_RENDER_CONTEXT
namespace gengine
{
	namespace kernel
	{
#define MAX_GL_CONTEX_ATTRIBS 9
class OGLRenderContext:public RenderContext
{
public:
	

	OGLRenderContext(int minorVers = 2 , int madjorVers = 1);
	virtual	~OGLRenderContext();

	bool	IsCurrent() ;
	bool	Create(HDC	hDC) ;
	bool	MakeCurrent(HDC	hDC) ;
	void	ShareContext(RenderContext & rc) ;
	
	int     GetMadjorVersion() const;
	int     GetMinorVersion()  const;
	
	const char *  GetRender ()     const;
	const char *  GetVendor ()     const;
	const char *  GetVersion()     const;
	const char *  GetGLSLVersion() const;


	RenderState  * GetRenderState() ;
	virtual	HGLRC	getRC();
private:
	void	Delete();
	HGLRC		  hRC;
	RenderState  *state;

	int contexAttribs[MAX_GL_CONTEX_ATTRIBS];
	

	
};
}
}
#endif